﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="vehicle_wait.aspx.cs" Inherits="AnyOffice.general.vehicle.checkup.vehicle_wait" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>车辆使用申请</title>
		
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script>
		function open_usage(usage_id)
		{
			URL="../usage_detail.aspx?usage_id=" + usage_id;
			myleft=(screen.availWidth-400)/2;
			window.open(URL,"read_usage","height=380,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
		}
		
		function open_vehicle(vehicle_id)
		{
			URL="../vehicle_detail.aspx?vehicle_id=" + vehicle_id;
			myleft=(screen.availWidth-500)/2;
			window.open(URL,"read_vehicle","height=350,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
		}
		
		function delete_usage(usage_id)
		{
			msg='确认要删除该记录么？';
			if(window.confirm(msg))
			{
				URL="delete.aspx?usage_id=" + usage_id + "&refer=vehicle_wait.aspx";
				window.location=URL;
			}
		}
		</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big" width="50%"><img src="/images/menu/vehicle.gif" height="20" width="20" align="absMiddle"><span class="big3">
							待批申请</span>
					</td>
					<td valign="bottom" class="small1"  width="50%"><asp:literal id="litNavCount" runat="server"></asp:literal>
					</td>
				</tr>
			</table>
			<asp:Repeater id="rptUsage" runat="server" EnableViewState="False">
				<HeaderTemplate>
					<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
						<tr class="TableHeader">
							<td noWrap align="center">车牌号</td>
							<td noWrap align="center">用车人</td>
							<td noWrap align="center">事由</td>
							<td noWrap align="center">开始时间</td>
							<td noWrap align="center">结束时间</td>
							<td noWrap align="center">备注</td>
							<td noWrap align="center">操作</td>
						</tr>
				</HeaderTemplate>
				<ItemTemplate>
					<tr class="TableLine1">
						<td noWrap align="center"><a href="javascript:open_vehicle('<%#Eval("VehicleId")%>');"><%#Eval("Number")%></a></td>										
						<td noWrap align="center"><%#Eval("Person")%></td>
						<td><%#Eval("Reason")%></td>
						<td noWrap align="center"><%#Eval("StartTime")%></td>						
						<td noWrap align="center"><%#Eval("EndTime")%></td>
						<td><%#Eval("Remark")%></td>
						<td noWrap align="center">
							<a href="javascript:open_usage('<%#Eval("UsageId")%>');">详细信息</a>
							<a href="manage.aspx?usage_id=<%#Eval("UsageId")%>&operation=1&refer=vehicle_wait.aspx">批准</a>
							<a href="manage.aspx?usage_id=<%#Eval("UsageId")%>&operation=2&refer=vehicle_wait.aspx">不准</a>						
							<a href="edit.aspx?usage_id=<%#Eval("UsageId")%>&refer=vehicle_wait.aspx">修改</a>
							<a href="javascript:delete_usage('<%#Eval("UsageId")%>')">删除</a>
						</td>
					</tr>
				</ItemTemplate>
				<AlternatingItemTemplate>
					<tr class="TableLine2">
						<td noWrap align="center"><a href="javascript:open_vehicle('<%#Eval("VehicleId")%>');"><%#Eval("Number")%></a></td>										
						<td noWrap align="center"><%#Eval("Person")%></td>
						<td><%#Eval("Reason")%></td>
						<td noWrap align="center"><%#Eval("StartTime")%></td>						
						<td noWrap align="center"><%#Eval("EndTime")%></td>
						<td><%#Eval("Remark")%></td>
						<td noWrap align="center">
							<a href="javascript:open_usage('<%#Eval("UsageId")%>');">详细信息</a>
							<a href="manage.aspx?usage_id=<%#Eval("UsageId")%>&operation=1&refer=vehicle_wait.aspx">批准</a>
							<a href="manage.aspx?usage_id=<%#Eval("UsageId")%>&operation=2&refer=vehicle_wait.aspx">不准</a>						
							<a href="edit.aspx?usage_id=<%#Eval("UsageId")%>&refer=vehicle_wait.aspx">修改</a>
							<a href="javascript:delete_usage('<%#Eval("UsageId")%>')">删除</a>
						</td>
					</tr>
				</AlternatingItemTemplate>
				<FooterTemplate>
					</table>					
				</FooterTemplate>
			</asp:Repeater>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
		</form>
	</body>
</HTML>
